﻿using Architecture.Api.Application.Commands.SlaughterCommand;
using Architecture.Domain.Services.Interface;
using MediatR;

namespace Architecture.Api.Application.CommandHandlers.SlaughterHandler
{
    public class SlaughterBatchSlaughterPictureCommandHandler : IRequestHandler<SlaughterBatchSlaughterPicCommand, int>
    {

        private readonly ISlaughterService _slaughterservice;

        public SlaughterBatchSlaughterPictureCommandHandler(ISlaughterService slaughterservice)
        {
            _slaughterservice = slaughterservice;
        }

        public async Task<int> Handle(SlaughterBatchSlaughterPicCommand request, CancellationToken cancellationToken)
        {
            return await _slaughterservice.BatchSlaughterPicList(request.productionLot, request.urlImg);
        }
    }
}
